<?xml version="1.0" encoding="UTF-8"?>

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:p="http://primefaces.org/ui"
     xmlns:c="http://java.sun.com/jsp/jstl/core"
     template="../../Template.xhtml"
     
 
>
<ui:define name="title">Add Price </ui:define>

<ui:define name="body">

<h:form>
<p:inputText  value="#{priceStrategieMB.type}"  />
	<p:panelGrid columns="2">
<h2>Add Price </h2>
<p:commandButton value="Back" action="ManageUserPrice.xhtml" />
</p:panelGrid>
</h:form>
<br/><br/><br/><br/>
<h:form>

<p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />


  <p:inputText value="#{priceStrategieMB.type}" />

	<p:panelGrid columns="3">
	
	<p:outputLabel value="Currency :" />
		   <p:selectOneMenu value="#{priceStrategieMB.idDevise}" >
		   
		   <f:selectItems  value="#{priceStrategieMB.listeDevise()}" var="a" itemValue="#{a.idDevise}" itemLabel="#{a.code}-#{a.symbole}"  />
		</p:selectOneMenu><br/>
		
		
	
		<p:outputLabel value="Period :"/>
			<p:panelGrid columns="2">
			<p:selectOneMenu value="#{priceStrategieMB.abonnement.nbrPeriode}">
		     <c:forEach var="i" begin="1" end="12" step="1">
		     	<f:selectItem itemLabel="#{i}" itemValue="#{i}"/>
		     </c:forEach>
			</p:selectOneMenu>
			<p:selectOneMenu  value="#{priceStrategieMB.abonnement.periode}" >
	
		     	<f:selectItem itemLabel="Month" itemValue="Month"/>
		         <f:selectItem itemLabel="Year" itemValue="Year"/>
			</p:selectOneMenu>
		    </p:panelGrid><br/>
		    
		<p:outputLabel value="Nomber Max of shippements:"/>
		<p:inputText id="sh" value="#{priceStrategieMB.abonnement.nbrMaxVoyage}" required="true" requiredMessage="Category name is required" />
		<p:message for="sh" />
		
		<p:outputLabel value="Periodic fee :"/>
		<p:inputText id="Periof" value="#{priceStrategieMB.abonnement.prix}" required="true" requiredMessage="Category name is required" />
		<p:message for="Periof" />
		
		
		<p:outputLabel value="Status :" />
		<p:selectOneMenu value="#{priceStrategieMB.abonnement.statut}" >
			<f:selectItem  itemValue="true" itemLabel="Active"  />
			<f:selectItem  itemValue="false" itemLabel="Inactive"  />
		</p:selectOneMenu><br/>
		
		<p:commandButton action="#{priceStrategieMB.AjouterAb}" value="Ajouter" ></p:commandButton>
		
	</p:panelGrid>
</h:form>
	
	
	
	
</ui:define>
</ui:composition>